#ifndef __ALBUM_BURST_H__
#define __ALBUM_BURST_H__

#include "sqlite3.h"
#include "common_info.h"

#include <ctime>
#include <vector>
#include <string>


// typedef struct {
//     std::string file_path;
//     std::time_t modification_time;
//     int file_count;
// } BurstInfo;


class AlbumBurst {
public:
    AlbumBurst();
    ~AlbumBurst();

    int createBurstInfoTable(sqlite3* db);
    int insertBurstInfo(const BurstInfo& burst_info);
    std::vector<BurstInfo> queryBurstInfoByTime();
    std::vector<BurstInfo> queryAllBurstInfo();
    std::vector<BurstInfo> queryBurstInfoByFilepath(const std::string& file_path);
    bool updateBurstInfo(const std::string& file_path, const std::string& new_filename);
    bool deleteBurstInfo(const std::string& file_path);
    void printBurstInfo(const BurstInfo& burst_info);
    int getCount();
    std::vector<BurstInfo> queryBurstInfoByTime(int page, int items_per_page);
    bool deleteDirectory(const std::string& burst_dir);
    bool renameDirectory(const std::string& burst_dir, const std::string& new_burst_name);
    bool updateBurst(const std::string& file_path);
};



#endif